package com.healthcloud.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.healthcloud.dao.BaseDepartmentDao;
import com.healthcloud.entity.BaseDepartmentEntity;
import com.healthcloud.service.BaseDepartmentService;
import com.healthcloud.utils.PageParam;



@Service("baseDepartmentService")
public class BaseDepartmentServiceImpl implements BaseDepartmentService {
	@Autowired
	private BaseDepartmentDao baseDepartmentDao;
	
	@Override
	public BaseDepartmentEntity queryObject(Integer id){
		return baseDepartmentDao.queryObject(id);
	}
	
	@Override
	public List<BaseDepartmentEntity> queryList(BaseDepartmentEntity bean, PageParam pageParam){
		return baseDepartmentDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(BaseDepartmentEntity bean){
		return baseDepartmentDao.queryTotal(bean);
	}
	
	@Override
	public void save(BaseDepartmentEntity baseDepartment){
		baseDepartmentDao.save(baseDepartment);
	}
	
	@Override
	public void update(BaseDepartmentEntity baseDepartment){
		baseDepartmentDao.update(baseDepartment);
	}
	
	@Override
	public void delete(Integer id){
		baseDepartmentDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		baseDepartmentDao.deleteBatch(ids);
	}

	@Override
	public void logicalDeletes(Long[] ids) {
		for (int i = 0; i < ids.length; i++) {
			logicalDelete(ids[i]);
		}
	}

	@Override
	public void logicalDelete(Long id) {
		baseDepartmentDao.logicalDelete(id);
	}

	@Override
	public BaseDepartmentEntity queryByDepName(String depName) {
		return baseDepartmentDao.queryByDepName(depName);
	}

}
